package com.sw.c.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sw.c.pojo.entity.Permission;
import com.sw.c.pojo.entity.RolePermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface RolePermissionMapper extends BaseMapper<RolePermission> {

    List<Permission> getByRoleIds(List<Integer> roleId);

    List<Permission> getByRoleIdAll();

    void batchInsert(List<RolePermission> rolePermissions);

    void deleteByIds(Integer roleId);

    void delRole(Integer delRole);

    List<Permission> getByUserIdList(@Param("list") List<Integer> roleList);

    List<Permission> getAll();

}
